public class mySecondController {

  public list<Account> getAccount() {
    return [select id, name,
            (select id, firstname, lastname
             from Contacts)
            from Account where id =
            :ApexPages.currentPage().getParameters().get('id')];
  }
}